#ifndef VIDEOTASK_BASE_H
#define VIDEOTASK_BASE_H

#include <Task_Base/Task_Base.h>
#include <libavinclude.h>
class Out_handler;
class VideoTask : public Task_Base
{
public:
    VideoTask(Out_handler *,AVStream *);

    ~VideoTask();

public:

    void appendVideoPacket(const AVPacket &);

    virtual int close();
private:
    virtual int svc();//主动工作线程函数

private:
    double synchronize_video(AVFrame *src_frame, double pts);
private:

    Out_handler *m_ReceiveHandler;

    AVStream    *m_pAVStream;

    double      video_clock;

    SwsContext  *img_convert_ctx;

    AVFrame     *pFrameRGB24;

    uint8_t     *bufferRGB ;

    int width   ;

    int height  ;
};

#endif // VIDEOTASK_BASE_H
